#include <cppunit/CompilerOutputter.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>

#pragma comment(lib, "ws2_32.lib")
#pragma comment(lib, "../../../lib/cppunit/cppunitd.lib")

#ifdef UTIL_IMPORTS
#pragma comment(lib, "../../../lib/ballade/util.lib")
#endif

#ifdef NETWORK_IMPORTS
#pragma comment(lib, "../../../lib/ballade/network.lib")
#endif

#ifdef SMARTCLIENT_IMPORTS
#pragma comment(lib, "../../../lib/ballade/smartclient.lib")
#endif

int main(int argc, char* argv[])
{
	CppUnit::TextUi::TestRunner runner;

	runner.setOutputter(new CppUnit::CompilerOutputter(&runner.result(), std::cout));

	CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest();
	runner.addTest(suite);

	bool wasSuccessful = runner.run();
	return !wasSuccessful;
}

